<template>
  <div class="public-views pay">
    <div class="public-inner">
      <div class="pay-wrap">
        <div class="user-info">
          <i :style="{backgroundImage: 'url(' + image + ')'}"></i>
          <div class="info-center">
            <h1>GuoGuosax</h1>
            <p>账号<span>miyugame_124545</span></p>
          </div>
          <div class="info-right">
            <p>99<span>米粒</span></p>
            <router-link to="/details/bill">我的账单</router-link>
          </div>
        </div>
        <ul class="pay-list">
          <li v-for="item in payList" :class="{'pay-list-activate': item.activate}" @click="selectMoney(item)">
            <h1>{{item.money}}</h1>
            <span>元</span>
            <i v-if="item.activate"></i>
            <p v-if="item.activate">送{{item.mili}}米粒</p>
          </li>
        </ul>
        <div class="pay-input">
          <div class="input-left">
            <input type="text" placeholder="5000">
            <p>选择充值金额（1元=100米粒）<span>送2000米粒</span></p>
            <i></i>
          </div>
          <div class="input-right">
            <p>《守望先锋》（Overwatch，简称OW） 是由暴雪娱乐公司开发的一款第一人称射击游戏，于2016年5月24日全球上市，称射击游戏，于2016年5月24日全球上市，中国</p>
            <p>《守望先锋》（Overwatch，简称OW） 是由暴雪娱乐公司开发的一款第一人称射击游戏，于2016年5月24日全球上市，开发的一款第一人称射击游戏，于2016年5月24日全球上市，中国</p>
          </div>
        </div>
        <div class="pay-type">
          <div class="type-line">支付方式</div>
          <a href="javascript:;">支付宝支付</a>
          <a href="javascript:;">微信支付</a>
          <a href="javascript:;">银联支付</a>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  title() {
    return `米娱游戏_充值中心`
  },
  data() {
    return {
      payList: [
        {money: 10, mili: 0, activate: false},
        {money: 50, mili: 20, activate: true},
        {money: 100, mili: 50, activate: false},
        {money: 200, mili: 120, activate: false},
        {money: 500, mili: 350, activate: false},
        {money: 1000, mili: 1000, activate: false}
      ],
      image: 'http://cdn.img.miyugame.com/official_web_img/images/1229/1510736069_85.png'
    }
  },
  methods: {
    // 选择金额
    selectMoney(item) {
      this.payList.map( v => v.activate = false )
      item.activate = true
    }
  }
}
</script>

<style lang="less" scoped>
.pay-wrap {
  background: #fff;
  padding: 30px 50px;
  box-shadow: 1px 1px 10px 1px #eee;
  margin-bottom: 50px;
  .user-info {
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
    overflow: hidden;
    i {
      width: 90px;
      height: 90px;
      border-radius: 50%;
      float: left;
      background-size: 100%;
      background-repeat: no-repeat;
    }
    .info-center {
      padding-left: 25px;
      float: left;
      h1 {
        line-height: 60px;
        color: #ffa93a;
        font-size: 24px;
      }
      p {
        font-size: 14px;
        color: #999;
        span {
          margin-left: 10px;
        }
      }
    }
    .info-right {
      float: right;
      p {
        font-weight: 600;
        font-size: 56px;
        color: #333;
        span {
          font-size: 14px;
          color: #999;
          font-weight: normal;
        }
      }
      a {
        display: block;
        width: 110px;
        text-align: center;
        line-height: 32px;
        background: #2cd0ff;
        color: #fff;
        border-radius: 5px;
        margin-top: 10px;
        font-size: 14px;
      }
    }
  }
  .pay-list {
    padding: 30px 0;
    overflow: hidden;
    li {
      width: 120px;
      height: 120px;
      border-radius: 50%;
      border: 3px solid #ffa93a;
      color: #ffa93a;
      text-align: center;
      float: left;
      margin-right: 68px;
      position: relative;
      cursor: pointer;
      h1 {
        font-size: 38px;
        padding-top: 40px;
      }
      span {
        display: block;
        line-height: 1;
        font-size: 14px;
        font-weight: 600;
      }
      i {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: url('../../assets/icon/pay_activate_icon.png') no-repeat;
        background-size: 100%;
        position: absolute;
        right: 0;
        bottom: 0;
        z-index: 2;
      }
      p {
        position: absolute;
        left: 0;
        bottom: -30px;
        width: 100%;
        text-align: center;
        color: #2cd0ff;
        font-size: 14px;
        font-weight: 600;
      }
      &:last-child {
        margin-right: 0;
      }
    }
    .pay-list-activate {
      background: #ffa93a;
      border: 3px solid #ffa93a;
      color: #fff;
    }
  } 
  .pay-input {
    padding: 30px 90px 30px 400px;
    overflow: hidden;
    position: relative;
    .input-left {
      position: absolute;
      width: 385px;
      height: 100px;
      left: 15px;
      top: 30px;
      input {
        display: block;
        width: 255px;
        line-height: 28px;
        height: 28px;
        border: 1px solid #ffa93a;
        padding: 10px 50px 10px 15px;
        color: #ffa93a;
        font-size: 16px;
        font-weight: 600;
      }
      p {
        line-height: 58px;
        font-size: 14px;
        color: #999;
        span {
          margin-left: 40px;
          color: #2cd0ff;
        }
      }
    }
    .input-right {
      p {
        line-height: 22px;
        font-size: 12px;
        color: #999;
      }
    }
  }
  .pay-type {
    text-align: right;
    overflow: hidden;
    font-size: 0;
    .type-line {
      color: #ffa93a;
      font-size: 14px;
      font-weight: 600;
      position: relative;
      &:after {
        content: '';
        width: 1200px;
        height: 1px;
        background: #eee;
        position: absolute;
        right: 75px;
        top: 50%;
        transform: translateY(-50%);
        -webkit-transform: translateY(-50%);
        -moz-transform: translateY(-50%);
        -o-transform: translateY(-50%);
      }
    }
    a {
      display: inline-block;
      width: 200px;
      height: 70px;
      font-size: 0;
      margin-right: 20px;
      background-size: 100% 100%;
      margin-top: 20px;
      &:nth-child(2) {
        background: url('../../assets/icon/pay_ali_icon.png') no-repeat;
      }
      &:nth-child(3) {
        background: url('../../assets/icon/pay_wx_icon.png') no-repeat;
      }
      &:nth-child(4) {
        background: url('../../assets/icon/pay_online_icon.png') no-repeat;
        margin-right: 0;
      }
    }
  }
}
</style>


